package com.hsogoo.study.spring.resource;

import org.junit.Test;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;

/**
 * Created by za-huangsaigang on 2018/9/17.
 */
public class ClassPathResourceTest extends ResourceTemplate {

    @Test
    public void testClassPathResource() throws Exception{
        Resource resource = new ClassPathResource("application.properties");
        if(resource.exists()){
            dumpStream(resource);
        }

        System.out.println("path:" + resource.getFile().getAbsolutePath());
        System.out.println(resource.isOpen());
    }
}
